using System;
using System.Collections.Generic;
using System.Text;
using IGGCore;

namespace IGG
{
    /// <summary>
    /// The single news formatter for the console app.
    /// </summary>
    public class ModeNewsFormatter : IModeFormatter
    {
        #region IModeFormatter Members

        /// <summary>
        /// Format the mlb.com news for the console app.
        /// </summary>
        public void FormatMode(Scoreboard board)
        {
            int newsCount = 10;

            for (int i = 0; i < newsCount; i++)
            {
                Output.WriteLine();
                Output.WriteLine(" " + board.News[i].Title.ToUpper());
                Output.WriteLine();
                Output.FormatLongText(board.News[i].Content);
                Output.WriteLine();
            }
            Output.WriteLine();
            Output.WriteLine(" AND NOW A SMALL PAGE OF BASEBALL HISTORY...");
            Output.WriteLine();
            Output.FormatLongText(board.History[0]);
            Output.WriteLine();
            Output.SetTopCursor();
        }

        #endregion
    }
}
